<%- include('header', { tabCls: 'trending' }); %>
<ul class="list repos trending">
  <li class="rank-title">
    <span class="select">
      <a class="<%= type === 'daily' ? 'active': '' %>" href="trending.html">Today</a>
      <a class="<%= type === 'weekly' ? 'active': '' %>" href="trending-weekly.html">Week</a>
      <a class="<%= type === 'monthly' ? 'active': '' %>" href="trending-monthly.html">Month</a>
    </span>
  </li>
  <% trending.forEach(function(repo, idx){ %>
  <li>
    <div class="info">
      <div class="rank">
        <span title="Ranking <%=idx + 1%>"><%=idx + 1%></span>
        <a href="<%=repo.html_url%>" target="_blank" title="<%=repo.full_name%>"><%=repo.full_name%></a>
      </div>
      <div class="sub-title followers">
        <% if(repo.language) {%>
        <a class="language" target="_blank" href="https://github.com/topics/<%=repo.language.toLowerCase()%>"  title="Programming Language <%=repo.language%>">
          <span style="background-color: <%=repo.color%>;"></span><%=repo.language%>
        </a>
        <% } %>
        <span class="star" title="Stargazers Count">
          <svg aria-label="star" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img">
            <path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path>
          </svg>
          <span><%=repo.stargazers_count%></span>
        </span>
        <span class="star" title="Repo Forked">
          <svg aria-label="repo-forked" height="16" viewBox="0 0 10 16" version="1.1" width="10" role="img">
            <path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z">
          </path>
          </svg>
          <span><%=repo.forked%></span>
        </span>
        <span class="star">
          <svg aria-label="star" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img">
            <path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path>
          </svg>
          <span><%=repo.todayStar%></span>
        </span>
      </div>
      <div class="details">
        <%=repo.description%>
      </div>
    </div>
  </li>
  <% }); %>
</ul>
<%- include('footer', { }); %>